1. Technical Field
The present invention relates to a printer and a method of adjusting emission intensity of an optical sensor that is mounted on the printer.
2. Related Art
There is, as a printer for performing a printing operation on a printing medium, an ink jet printer including a print head for ejecting an ink to a printing medium and a carriage mounted with the print head. An optical sensor having a light-emitting element and a light-receiving element is widely used in such a type of printers. For example, the optical sensor is attached to a bottom surface of a carriage and is used to detect an end of a printing medium housed in the printer.
An optical sensor is exemplified which outputs a low-level signal at the time of detecting a printing medium and outputs a high-level signal at the time of not detecting the printing medium. When the optical sensor detects an end of the printing medium (an end close to a start point in the traveling direction of the carriage), it is judged whether a low level lasts by a predetermined size DW after an output of the sensor is changed from a high level to the low level. The size DW is set to be sufficiently larger than the width of a rib. When the low level lasts by DW, it is judged that the printing medium is detected but not the rib. As a result, the printer recognizes a coordinate of the carriage as an end of the printing medium when the high level is changed to the low level (for example, see JP-A-2005-081750).
As a printer mounted with an optical sensor, there is a printer which includes a printing unit for performing a printing operation on a printing medium, a supporting unit for supporting the printing medium to which the printing operation is performed by the printing unit, and an optical sensor that is disposed to be opposed to the supporting unit and to be movable relative to the supporting unit, that has a light-emitting portion and a light-receiving portion, and that generates a signal corresponding to the intensity of light received by the light-receiving portion (for example, see JP-A-2005-313603).
Such a printer detects a printing medium by comparing a predetermined threshold value with a value obtained by sampling a signal generated from the optical sensor with a predetermined period when the optical sensor moves relative to the supporting unit at the time of performing a printing operation. At the time of checking a state of the supporting unit, the printer samples the signal generated from the optical sensor with a period different from the predetermined period when the optical sensor moves relative to the supporting unit and changes a predetermined threshold value on the basis of the value obtained by the sampling.
When the existence of a printing medium is detected by the use of an optical sensor, it is preferable that a difference in output voltage between the existence and the non-existence of a printing medium is large. Accordingly, a value of current flowing in a light-emitting element of the optical sensor need be set equal to or greater than a predetermined value. In consideration of deterioration in output due to a variation of the optical sensor with the lapse of time, uneven outputs of optical sensors, or printing operations on various printing mediums, it is necessary to keep the output voltage of the optical sensor constant even when such conditions vary.
When a circuit mounted with an optical sensor is designed in consideration of such a problem, a phenomenon that a value of current flowing in the optical sensor is reduced even with an increase in voltage supplied to the optical sensor may occur due to characteristics of transistors in the circuit. When the output voltage of the optical sensor is small, the voltage supplied to the optical sensor is usually set to the maximum, but the value of current flowing in the optical sensor may not increase. Accordingly, it is required to optimally detect a printing medium even when such a phenomenon occurs.